Base solution for your next web application

Activities of "paul lee"

It turns out to be a data problem, forgot to link the AbpUser with the default Company row, therefore, no Company name to be displayed.

I haven't changed the private Set's on the Entity and it seems to be working just fine.

Thank you very much!

Hi there,

I have the following model:

public class User : AbpUser<Tenant, User>
  {
    // code omitted for brevity
    [ForeignKey("Employeer")]
    public virtual long? EmployeerId { get; set; }
    public virtual Company Employeer { get; set; }
  }

  public class Company : FullAuditedEntity<long>, IMustHaveTenant
  {
    // code omitted for brevity
    [Required]
    [StringLength(MaxCodeLength)]
    public virtual string Code { get; private set; }  
    [Required]
    [StringLength(MaxNameLength)]
    public virtual string Name { get; private set; }
    public virtual int TenantId { get; set; }

    public virtual ICollection<User> Employees { get; private set; }
  }

And I want to map this into the following DTO:

[AutoMapFrom(typeof(User))]
  public class UserLoginInfoDto : EntityDto<long>
  {
    public string Name { get; set; }
    public string Surname { get; set; }
    public string UserName { get; set; }
    public string EmailAddress { get; set; }
    public string EmployeerName { get; set; }
  }

But AutoMapper is not mapping the Company.Name into EmployeerName in the DTO. How can I make this happen?

Thanks

Hi,

I am working on a project which would benefit from using Abp, however, the management doesn't allow me to use the framework per see. So I am trying to grab stuff from Abp where-ever I need them (hope the author of Abp don't mind), hope that one day I can be allowed to transfer this app to use Abp.

At the moment I am trying to get the ng-include to successfully include the header.cshtml. When I ran the webapp, I am getting 403-Forbidden back from ASP.Net for those ng-include(s).

So, please can you explain how can I get cshtml successfully being included?

Thank you very much for your help.

Hi Halil,

I would like to take a stab at the problem but I need some information on how the JavaScript proxies are being generated by the framework at the moment. However, I could not find the info from ABP documentations. Will you be kind enough to explain briefly about this process?

Thank you!

I have successfully added a custom WebApi controller in the WebApiModule, but how can I get ABP to generate the Dynamic JavaScript Proxy for these custom WebApi controllers?

If I can not, does that means I will have to hardcode the URL in the AngularJs side to consume these controllers?

Hi all,

I am in a similar situation, but my problem comes from DTO Data Validation failed on the server side, however, all I have got from the pop-up windows is "Your request is not valid."

I have added all the DataAnnotations to the Input DTO with ErrorMessage set, but I can't get them to be displayed in that big pop-up.

The following is a sample of one Property from the AddressInput (DTO):

[Required(ErrorMessage = "Unit in Address is required")]
    [StringLength(5
                                , ErrorMessage = "Unit in Address can not be longer then 5 characters")]
    public string Unit { get; set; }

So what do we need to do to get these messages displayed in that pop-up?

Hi All,

I am new to ASP.NET MVC and Single Page Application, I am trying to develop a SPA for managing member's information.

At the moment I am trying to add a new View for typing in the Member's Personal Info and needed a field for Date Of Birth, the field can either be a formatted TextBox or a DatePicker.

Here is what I have got so far in the cshtml:

<div ng-controller="coa.views.people.new as vm">
  <form id="NewPersonForm" role="form" name="newPersonForm" novalidate>
    <div class="form-group">
      <label for="MemberId">@L("MemberIdDescription")</label>
      <text id="MemberId" ng-model="vm.person.memberId" class="form-control"></text>
    </div>
    <div class="form-group">
      <label for="ChiSurname">@L("ChineseSurnameDescription")</label>
      <text id="ChiSurname" ng-model="vm.person.chiSurname" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="ChiOtherNames">@L("ChineseOtherNamesDescription")</label>
      <text id="ChiOtherNames" ng-model="vm.person.chiOtherNames" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="EngSurname">@L("EnglishSurnameDescription")</label>
      <text id="EngSurname" ng-model="vm.person.engSurname" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="EngOtherNames">@L("EnglishOtherNamesDescription")</label>
      <text id="EngOtherNames" ng-model="vm.person.engOtherNames" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="Alias">@L("AliasDescription")</label>
      <text id="Alias" ng-model="vm.person.alias" class="form-control"></text>
    </div>
    <div class="form-group">
      <label for="DateOfBirth">@L("DateOfBirthDescription")</label>
      <text id="DateOfBirth" ng-model="vm.person.dob" class="form-control" required></text>
    </div>
  </form> 
</div>

I am not sure what tag to use for Formatted TextBox or DatePicker, most of the examples from Google searches on Razor / cshtml seems to use the native Razor markups so I am not sure what to use here.

Please Help!

Thank you very much.

Paul

Showing 11 to 17 of 17 entries